From: Alexander Larsson Date: Fri, 21 Oct 2016 08:13:54 +0000 (+0200) Subject: ostree_repo_read_commit_detached_metadata: Handle parent repo X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~45^2~2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/?a=commitdiff_plain;h=d43c1216759564e974782695ecdade1fa827c343;p=ostree.git ostree_repo_read_commit_detached_metadata: Handle parent repo If the detached metadata is not in the repo, try in the parent repo if that is set. Without this a commit will not gpg validate in the child repo Closes: #539 Approved by: giuseppe --- diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c index 8dfe276f..3d8008f7 100644 --- a/src/libostree/ostree-repo-commit.c +++ b/src/libostree/ostree-repo-commit.c @@ -2044,6 +2044,12 @@ ostree_repo_read_commit_detached_metadata (OstreeRepo *self, goto out; } + if (ret_metadata == NULL && self->parent_repo) + return ostree_repo_read_commit_detached_metadata (self->parent_repo, + checksum, + out_metadata, + cancellable, + error); ret = TRUE; ot_transfer_out_value (out_metadata, &ret_metadata); out: